package com.example.myapplication;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

public class zhuceActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_zhuce);

        Button Bclose = findViewById(R.id.close);

        Bclose.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        EditText et1 = findViewById(R.id.editText4);
        EditText et2 = findViewById(R.id.editText5);
        Button btn = findViewById(R.id.button3);

        btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String password = et1.getText().toString().trim();
                String querenpassword = et2.getText().toString().trim();
                if (password.equals(querenpassword)){
                    Toast.makeText(zhuceActivity.this, "密码一致，可以注册", Toast.LENGTH_SHORT).show();
                }else {
                    Toast.makeText(zhuceActivity.this, "俩次输入的密码不一致，请重新输入12", Toast.LENGTH_SHORT).show();
                }
            }
        });


    }
}
